package com.sinosoft.vaccinetoai.server.business.chatrecord.updatechatrecord.service.impl;

import com.sinosoft.vaccinetoai.dao.mapper.business.ChatRecordMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import com.sinosoft.vaccinetoai.server.business.chatrecord.updatechatrecord.io.UpdateChatRecordIO;
import com.sinosoft.vaccinetoai.server.business.chatrecord.updatechatrecord.vo.UpdateChatRecordVO;
import com.sinosoft.vaccinetoai.server.business.chatrecord.updatechatrecord.service.IUpdateChatRecordService;

import javax.annotation.Resource;

/**
 * @ClassName: UpdateChatRecordServiceImpl
 * @ClassNameExplain: 
 * @Description: 更新会话聊天Service Impl
 * @author xiazhihao
 * @date 2024年10月25日 17:22
 */
@Slf4j
@Service("UpdateChatRecordService")
public class UpdateChatRecordServiceImpl implements IUpdateChatRecordService {

	@Resource
	private ChatRecordMapper chatRecordMapper;

	@Override
	public UpdateChatRecordVO updateChatRecord(UpdateChatRecordIO io) throws Exception {
        UpdateChatRecordVO vo = new UpdateChatRecordVO();
        //保证clientId不变 防止他人注入
        io.setUserId(null);
        chatRecordMapper.updateByPrimaryKeySelective(io);
		return vo;
	}
	
}